package structural.composite.security;

public class Test {

    public static void main(String[] args) {
        SecurityDirectory pDir1 = new SecurityDirectory("文件夹1");
        SecurityDirectory pDir2 = new SecurityDirectory("文件夹2");
        ISecurityFile pFIle1 = new SecuirtyFile("文件1内容");
        ISecurityFile pFIle2 = new SecuirtyFile("文件2内容");
        ISecurityFile pFIle3 = new SecuirtyFile("文件3内容");
        ISecurityFile pFIle4 = new SecuirtyFile("文件4内容");
        pDir1.addFile("文件1", pFIle1);
        pDir1.addFile("文件2", pFIle2);
        pDir1.addFile("文件夹2", pDir2);
        pDir2.addFile("文件3", pFIle3);
        pDir2.addFile("文件4", pFIle4);
        pDir1.printContent();
    }
}
